package com;

/**
 * @author qqq
 * @version 1.0
 * @date $(DATE)$(TIME)
 * @description
 */
public class Rectangle {
    //属性
    private double chang;
    private double kuan;

    public Rectangle() {
    }

    public Rectangle(double chang, double kuan) {
        this.chang = chang;
        this.kuan = kuan;

    }

    public double getChang() {
        return chang;
    }

    public void setChang(double chang) {
        this.chang = chang;
    }

    public double getKuan() {
        return kuan;
    }

    public void setKuan(double kuan) {
        this.kuan = kuan;
    }

    public double getArea() {
        return chang * kuan;
    }

    public double getPerimeter() {
        return (chang+kuan)*2;
    }

    public String getInfo(){
       return "长：" + chang + "，宽：" + kuan + "，面积：" + getArea() + "，周长：" + getPerimeter();
    }
}


